package morning.cat.enums;

public class CommonTypes {

	public enum MedicalInstType {
		govermentUnion(2, "政府机关"), chiefHospital(1, "医院"), communityHospital(3,
				"社区医院"), medicalCompany(4, "医药公司"), subHospital(5, "医院分院");

		private int type;

		private String message;

		public int getType() {
			return type;
		}

		public String getMessage() {
			return message;
		}

		private MedicalInstType(int type, String message) {
			this.type = type;
			this.message = message;
		}

		public static String getMsgByType(int type) {
			for (MedicalInstType result : MedicalInstType.values()) {
				if (result.getType() == type) {
					return result.message;
				}
			}
			return null;
		}
	}

	/**
	 * 周一、周二、周三、周四、周五、周六、周日 Monday, Tuesday, Wednesday, Thursday, Friday,
	 * Saturday, Sunday
	 */
	public enum Week {
		Monday(1, "周一"), Tuesday(2, "周二"), Wednesday(3, "周三"), Thursday(4, "周四"), Friday(
				5, "周五"), Saturday(6, "周六"), Sunday(0, "周日");

		private int type;

		private String desc;

		public int getType() {
			return type;
		}

		public String getDesc() {
			return desc;
		}

		private Week(int type, String desc) {
			this.type = type;
			this.desc = desc;
		}

		public static String getDescByType(int type) {

			for (Week result : Week.values()) {
				if (result.getType() == type) {
					return result.desc;
				}
			}
			return null;
		}
	}
}
